1. Field of the Invention
The present invention relates to a portable terminal device such as a portable telephone with a digital camera or a camera, a program for reading information, and a recording medium having the program recorded thereon.
2. Background Art
Current portable telephones, which are provided with display devices such as a liquid crystal panel and input devices through key inputting, etc., tend to have multiple functions such as e-mail exchange and game-playing, in addition to telephone functions for transmitting and receiving radio waves.
In recent years, small image sensors with low power consumption have been developed, and this has allowed a camera to be built in a portable terminal device such as a portable telephone. Thus, it is possible to send images by e-mail immediately after they are taken by a built-in camera. As for these cameras, priority is given to the fact that they are small, and their resolution is lower than that of generally available digital cameras.
Further, in recent years, portable telephones can be connected to the Internet. For the connection to the Internet, it is necessary to input a URL (Uniform Resource Locator) through the keys and it is troublesome to input a long URL through the keys of a portable telephone. To solve this problem, a unique number is assigned to a URL, a bar code corresponding to the number is printed, and the printed bar code is read by a bar code reader, which avoids excessive user labor for inputting the URL. This attempt has been made to improve the usability for users. In the case of such a device, an independent bar code reader is required to be connected to a portable telephone.
However, in the case of a portable terminal device having a camera built therein, when a bar code is recognized from a bar code image inputted by the built-in camera, the above service is available without the preparation of an independent bar code reader.
JP Patent Publication (Kokai) No. 2002-111909 A, for example, discloses an information-providing service whereby a user can select and set among a photograph mode and a QR code (two-dimensional code) reading mode, and where processing is conducted in accordance with the setting mode. Further, JP Patent Publication (Kokai) No. 9-259215 A (1997) discloses a code reader, which processes a one-dimensional code by a line CCD and a two-dimensional code by an area CCD for enhancing reading accuracy. However, the setting of a camera image capture area in accordance with types of bar codes is not disclosed.
Furthermore, JP Patent Publication (Kokai) No. 2001-197186 A discloses that a telephone number is replaced with a two-dimensional bar code and the two-dimensional bar code is read by a CCD scanner installed on a telephone.
In the meantime, the resolution of currently built-in cameras is lower than that of an image sensor used for a bar code reader and therefore it has been difficult to recognize a bar code with high accuracy.
Further, the cause for the above difficulty in recognizing bar codes is that the widths of bars photographed on an input image are not constant. This is because the distance between a bar code and a camera varies whenever an image is inputted. In the case of a close-up type scanner, a bar code can be always inputted in a constant size, and therefore the widths of bars can be predetermined. However, when a bar code is photographed by a hand held camera, it is impossible to predetermine constant bar widths.
A method for recognizing a bar code by determining bar widths based on a bar code image inputted by an image scanner has been proposed. For example, JP Patent Publication (Kokai) No. 2002-176509 A discloses a device that recognizes a bar code included in an image captured by a camera, and generates speaker sound when the captured image is decodable. At the same time, it saves the bar code data and displays it as an image on a display part.
However, conventional portable terminals with cameras have the following problems.
For example, since a one-dimensional code or a two-dimensional code differs in physical size from a code to be read, suitable resolution has to be selected depending on the size of codes in the case of a portable telephone camera, which has a comparatively low resolution.
Also, a camera usually set for photographing persons or landscapes is not anticipated for use in macro-mode photographing of a bar code, and thus a bar code image suitable for reading cannot be taken.
Furthermore, since a camera of a portable terminal device has a comparatively narrow angle of view, it is difficult to set a code to be read in a range photographed by the camera. In this case, close-up photographing is necessary, and this causes a shadow of the main body of the device itself or the like, which is likely to affect a captured image, so that a stable image cannot be obtained.